//
// Created by Administrator on 2021/6/8.
//
#include <time.h>
int chicken_question(int g[], int m[], int s[]) {
    int a, b, c, k = 0;
    for (a = 0; a <= 100; a++)
        for (b = 0; b <= 100; b++)
            for (c = 0; c <= 100; c++)
                if ((a + b + c == 100) && (5 * a + 3 * b + c / 3 == 100) && (c % 3 == 0)) {
                    g[k] = a;
                    m[k] = b;
                    s[k] = c;
                    k = k + 1;
                }
    return k;
}

//int chicken_question(int g[], int m[], int s[]) {
//    int a, b, c, k = 0;
//    for (a = 0; a <= 20; a++)
//        for (b = 0; b <= 33; b++) {
//            c = 100 - a - b;
//            if ((5 * a + 3 * b + c / 3 == 100) && (c % 3) == 0) {
//                g[k] = a;
//                m[k] = b;
//                s[k] = c;
//                k = k + 1;
//            }
//        }
//    return k;
//}
//公鸡一只五块钱，母鸡一只三块钱，一块钱三只小鸡。用一百块钱买一百只鸡，问公鸡，母鸡，小鸡各几只
//20+18*3+78/3;
void main()
{
    int k;
    clock_t start,end;
    start=clock();

    int g[100],m[100],s[100];
    int seconds = time(NULL);
    k = chicken_question(g, m, s);
    end=clock();
//    printf("%d", k);
    printf("%d %d %d %d %d", g[0],g[1],g[2],g[3], end);
}